package app.mvc.view.mediators
{
	import alternativa.gui.data.DataProvider;
	
	import app.mvc.Notifications;
	import app.mvc.model.VO.ControlsBarVO;
	import app.mvc.model.VO.LabelVO;
	import app.mvc.view.AppMainView;
	import app.mvc.view.layers.BackgroundLayer;
	
	import org.puremvc.as3.interfaces.IMediator;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.mediator.Mediator;
	
	public class BackgroundViewMediator extends Mediator implements IMediator
	{
		public static const NAME:String = "BackgroundViewMediator";
		
		private var backGroundLayer:BackgroundLayer;
		public function BackgroundViewMediator(mediatorName:String=null, viewComponent:Object=null)
		{
			super(mediatorName, viewComponent);
			
			backGroundLayer = viewComponent as BackgroundLayer;
		}
		
		override public function listNotificationInterests():Array
		{
			// TODO Auto Generated method stub
			return [
				Notifications.TO_CHANGE_BACKGROUND
			
			];
		}
		
		override public function handleNotification(notification:INotification):void
		{
			// TODO Auto Generated method stub
			super.handleNotification(notification);
			
			switch(notification.getName())
			{
				case Notifications.TO_CHANGE_BACKGROUND:
					backGroundLayer.changeBackground(notification.getBody() as String);
					break;
			}
		}
		
		
	}
}